<template>
  <view class="index-box">
    <view>{{ '当前时间：' + format().days(new Date()) }}</view>
    <text class="title">{{ title }}</text>
    <image
      style="width: 120rpx; height: 120rpx; border-radius: 50%; margin: 20rpx"
      :src="useUserStore().userInfo.avatar"
      mode="scaleToFill"
    />
    <view>{{ useUserStore().userInfo.username }}</view>
  </view>
</template>

<script setup lang="ts">
import { useUserStore } from '@/store/user'
import { format } from '@/util/format'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
const title = ref('Hello')
</script>

<style scoped lang="scss">
.index-box {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .title {
    font-size: 36rpx;
    color: #f35678;
  }
}
</style>
